﻿<body>
<div id="longDesc">
<span style="font-family:Calibri; font-size:medium">
<h1 style="font-family:Calibri Light; color:#2e74b5; font-size:large">Introduction</h1>
    <p>
        The<strong> xSQLServer</strong> module is a part of the Windows PowerShell Desired State Configuration (DSC) Resource Kit, which is a collection of DSC Resources produced by the PowerShell Team.
        This module contains resources for setup of SQL Server that is fully compliant with the requirements of System Center, as well as resources for configuration of SQL Server feature specific firewall rules, and configuration of SQL Server Reporting Services secure connection level.         The
        <strong>xSQLServer</strong> module contains the following resources:
    </p>
    <ul style="list-style-type: disc; direction: ltr;">
        <li>
            <strong>xSQLServerSetup: </strong>for installation of a standalone SQL Server instance
        </li>
        <li>
            <strong>xSQLServerFirewall: </strong>configure firewall settings to allow remote access to a SQL Server instance
        </li>
        <li>
            <strong>xSQLServerRSSecureConnectionLevel: </strong>set the secure connection level for SQL Server Reporting Services
        </li>
        <li>
            <strong>xSQLServerFailoverClusterSetup: </strong>for installation of SQL Server failover cluster instances
        </li>
        <li>
            <strong>xSQLServerRSConfig: </strong>configure SQL Server Reporting Services to use a database engine in another instance    
        </li>
    </ul>
</p>
<p><strong>All of the resources in the DSC Resource Kit are provided AS IS, and are not supported through any Microsoft standard support program 
or service. The ""x" in xSQLServer stands for experimental</strong>, which means that these resources will be <strong>fix forward</strong> 
and monitored by the module owner(s).</p>
<p>Please leave comments, feature requests, and bug reports in the Q &amp; A tab for this module.</p>
<p>If you would like to modify <strong>xSQLServer</strong> module, feel free. When modifying, please update the module name, resource friendly name, 
and MOF class name (instructions below). As specified in the license, you may copy or modify this resource as long as they are used on the Windows Platform.</p>
<p>For more information about Windows PowerShell Desired State Configuration, check out the blog posts on the
<a href="http://blogs.msdn.com/b/powershell/"><span style="color:#0000ff">PowerShell Blog</span></a> (</span><a href="http://blogs.msdn.com/b/powershell/archive/2013/11/01/configuration-in-a-devops-world-windows-powershell-desired-state-configuration.aspx"><span style="color:#0000ff">this</span></a> is a good starting point). There are 
also great community resources, such as <a href="http://powershell.org/wp/tag/dsc/"><span style="color:#0000ff">PowerShell.org</span></a>, or
<a href="http://www.powershellmagazine.com/tag/dsc/"><span style="color:#0000ff">PowerShell Magazine</span></a>. For more information on the DSC Resource Kit, check out 
<a href="http://go.microsoft.com/fwlink/?LinkID=389546"><span style="color:#0000ff">this blog post</span></a>.<br></p>

<h1 style="color:#2e74b5; font-family:Calibri Light; font-size:large">Installation</h1>
<p>To install the <strong >xSQLServer</strong> module </p>
    <ul style="list-style-type: disc; direction: ltr;">
        <li>
            If you are using WMF4 / PowerShell Version 4: Unzip the content under $env:ProgramFiles\WindowsPowerShell\Modules folder
        </li>
        <li>
            If you are using WMF5 Preview: From an elevated PowerShell session run
            ‘Install-Module xSCSR’
        </li>
    </ul>

<p>To confirm installation:<br></p>
<ul style="list-style-type:disc; direction:ltr">
<li>Run <strong>Get-DSCResource</strong> to see that <strong>xSQLServerSetup, xSQLServerFirewall, xSQLServerRSSecureConnectionLevel, and xSQLServerRSConfig</strong> are among the DSC Resources listed.<br></li>
</ul>

<h1 style="color:#2e74b5; font-family:Calibri Light; font-size:large">Requirements</h1>
<p>This module requires PowerShell v4.0, which ships in Windows 8.1 or Windows Server 2012R2. To easily use PowerShell 4.0 on older operating systems,
<a href="http://www.microsoft.com/en-us/download/details.aspx?id=40855"><span style="color:#0000ff">install WMF 4.0</span></a>. Please read the installation instructions 
that are present on both the download page and the release notes for WMF 4.0.</p>

<h1 style="color:#2e74b5; font-family:Calibri Light; font-size:large">Details</h1>
    <p>
        The <strong>xSQLServer </strong> enables setup of SQL Server, fully compliant with the requirements of System Center, as well as configuration of SQL Server feature specific firewall rules, and configuration of SQL Server Reporting Services secure connection level.
        This module contains the following resources:
    </p>

<p><strong>xSQLServerSetup </strong> resource has the following properties:</p>
<ul style="list-style-type:disc; direction:ltr">
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SourcePath:</span> REQUIRED - UNC path to the root of the source files for installation.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SourceFolder:</span> Folder within the source path containing the source files for installation.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SetupCredential:</span> REQUIRED - Credential to be used to perform the installation.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">Features: </span>KEY - SQL features to be installed.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">InstanceName: </span>KEY - SQL instance to be installed.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">InstanceID: </span>SQL instance ID, if different from InstanceName.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">PID: </span>Product key for licensed installations.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">UpdateEnabled: </span>Enabled updates during installation.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">UpdateSource: </span>Source of updates to be applied during installation.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SQMReporting: </span>Enable customer experience reporting.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">ErrorReporting: </span>Enable error reporting.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">InstallSharedDir: </span>Installation path for shared SQL files.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">InstallSharedWOWDir: </span>Installation path for x86 shared SQL files.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">InstanceDir: </span>Installation path for SQL instance files.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SQLSvcAccount: </span>Service account for the SQL service.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SQLSvcAccountUsername: </span>Output username for the SQL service.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">AgtSvcAccount: </span>Service account for the SQL Agent service.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">AgtSvcAccountUsername: </span>Output username for the SQL Agent service.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SQLCollation: </span>Collation for SQL.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SQLSysAdminAccounts: </span>Array of accounts to be made SQL administrators.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SecurityMode: </span>SQL security mode.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SAPwd: </span>SA password, if SecurityMode=SQL.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">InstallSQLDataDir: </span>Root path for SQL database files.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SQLUserDBDir: </span>Path for SQL database files.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SQLUserDBLogDir: </span>Path for SQL log files.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SQLTempDBDir: </span>Path for SQL TempDB files.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SQLTempDBLogDir: </span>Path for SQL TempDB log files.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SQLBackupDir: </span>Path for SQL backup files.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">FTSvcAccount: </span>Service account for the Full Text service.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">FTSvcAccountUsername: </span>Output username for the Full Text service.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">RSSvcAccount: </span>Service account for Reporting Services service.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">RSSvcAccountUsername: </span>Output username for the Reporting Services service.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">ASSvcAccount: </span>Service account for Analysus Services service.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">ASSvcAccountUsername: </span>Output username for the Analysis Services service.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">ASCollation: </span>Collation for Analysis Services.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">ASSysAdminAccounts: </span>Array of accounts to be made Analysis Services admins.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">ASDataDir: </span>Path for Analysis Services data files.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">ASLogDir: </span>Path for Analysis Services log files.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">ASBackupDir: </span>Path for Analysis Services backup files.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">ASTempDir: </span>Path for Analysis Services temp files.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">ASConfigDir: </span>Path for Analysis Services config.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">ISSvcAccount: </span>Service account for Integration Services service.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">ISSvcAccountUsername: </span>Output username for the Integration Services service.
    </li>
</ul>
    
<p><strong>xSQLServerFirewall</strong> has the following properties:</p>
<ul style="list-style-type:disc; direction:ltr">
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">Ensure: </span>KEY - An enumerated value (Present, Absent) that describes if the SQL firewall rules are is expected to be enabled on the machine.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SourcePath: </span>REQUIRED - UNC path to the root of the source files for installation.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">SourceFolder: </span>Folder within the source path containing the source files for installation.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">Features: </span>KEY - SQL features to enable firewall rules for
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">InstanceName: </span>KEY - SQL instance to enable firewall rules for.
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">DatabaseEngineFirewall: </span>Is the firewall rule for the Database Engine enabled?
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">BrowserFirewall: </span>Is the firewall rule for the Browser enabled?
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">ReportingServicesFirewall: </span>Is the firewall rule for Reporting Services enabled?
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">AnalysisServicesFirewall: </span>Is the firewall rule for Analysis Services enabled?
    </li>
    <li>
        <span style="width: 250px; float: left; font-weight: bold;">IntegrationServicesFirewall: </span>Is the firewall rule for the Integration Services enabled?
    </li>
</ul>
    
    <p><strong>xSQLServerRSSecureConnectionLevel </strong> has the following properties:</p>
    <ul style="list-style-type:disc; direction:ltr">
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">InstanceName: </span>KEY - SQL instance to set secure connection level for.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SecureConnectionLevel: </span>KEY - SQL Server Reporting Service secure connection level.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">Credential: </span>REQUIRED - Credential with administrative permissions to the SQL instance.
        </li>
    </ul>
    <p><strong>xSQLServerFailoverClusterSetup </strong> resource has the following properties:</p>
    <ul style="list-style-type:disc; direction:ltr">
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">Action: </span>Key: Options are Prepare or Complete
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SourcePath: </span>REQUIRED - UNC path to the root of the source files for installation.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SourceFolder: </span>Folder within the source path containing the source files for installation.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">Credential: </span>REQUIRED - Credential to be used to perform the installation.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">Features: </span>REQUIRED - SQL features to be installed.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">InstanceName: </span>KEY - SQL instance to be installed.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">InstanceID: </span>SQL instance ID, if different from InstanceName.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">PID: </span>Product key for licensed installations.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">UpdateEnabled: </span>Enabled updates during installation.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">UpdateSource: </span>Source of updates to be applied during installation.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SQMReporting: </span>Enable customer experience reporting.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">ErrorReporting: </span>Enable error reporting.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">FailoverClusterGroup: </span>Name of the resource group to be used for the SQL Server failover cluster.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">FailoverClusterNetworkName: </span>REQUIRED - Network name for the SQL Server failover cluster.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">FailoverClusterIPAddress: </span>IPv4 address for the SQL Server failover cluster.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">InstallSharedDir: </span>Installation path for shared SQL files.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">InstallSharedWOWDir: </span>Installation path for x86 shared SQL files.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">InstanceDir: </span>Installation path for SQL instance files.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SQLSvcAccount: </span>Service account for the SQL service.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SQLSvcAccountUsername: </span>Output username for the SQL service.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">AgtSvcAccount: </span>Service account for the SQL Agent service.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">AgtSvcAccountUsername: </span>Output username for the SQL Agent service.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SQLCollation: </span>Collation for SQL.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SQLSysAdminAccounts: </span>Array of accounts to be made SQL administrators.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SecurityMode: </span>SQL security mode.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SAPwd: </span>SA password, if SecurityMode=SQL.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">InstallSQLDataDir: </span>Root path for SQL database files.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SQLUserDBDir: </span>Path for SQL database files.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SQLUserDBLogDir: </span>Path for SQL log files.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SQLTempDBDir: </span>Path for SQL TempDB files.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SQLTempDBLogDir: </span>Path for SQL TempDB log files.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SQLBackupDir: </span>Path for SQL backup files.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">ASSvcAccount: </span>Service account for Analysus Services service.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">ASSvcAccountUsername: </span>Output username for the Analysis Services service.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">ASCollation: </span>Collation for Analysis Services.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">ASSysAdminAccounts: </span>Array of accounts to be made Analysis Services admins.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">ASDataDir: </span>Path for Analysis Services data files.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">ASLogDir: </span>Path for Analysis Services log files.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">ASBackupDir: </span>Path for Analysis Services backup files.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">ASTempDir: </span>Path for Analysis Services temp files.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">ASConfigDir: </span>Path for Analysis Services config.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">ISSvcAccount: </span>Service account for Integration Services service.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">ISSvcAccountUsername: </span>Output username for the Integration Services service.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">ISFileSystemFolder: </span>File system folder for Integration Services.
        </li>
    </ul>

    <p><strong>xSQLServerRSConfig </strong> resource has the following properties:</p>
    <ul style="list-style-type:disc; direction:ltr">
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">InstanceName: </span>KEY - Name of the SQL Server Reporting Services instance to be configured.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">RSSQLServer: </span>REQUIRED - Name of the SQL Server to host the Reporting Service database.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">RSSQLInstanceName: </span>REQUIRED - Name of the SQL Server instance to host the Reporting Service database.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">SQLAdminCredential: </span>REQUIRED - Credential to be used to perform the configuration.
        </li>
        <li>
            <span style="width: 250px; float: left; font-weight: bold;">IsInitialized: </span>Output is the Reporting Services instance initialized.
        </li>
    </ul>
        <h1 style="color:#2e74b5; font-family:Calibri Light; font-size:large">Renaming Requirements</h1>
        <p>When making changes to these resources, we suggest the following practice:</p>
        <ol style="list-style-type:decimal; direction:ltr">
            <li>
                Update the following names by replacing MSFT with your company/community name and replacing the <strong>"x"</strong> with <strong>"c"</strong> (short for "Community") or another prefix of your choice:
                <ul>
                    <li>
                        <strong>Module name (ex: xSQLServer</strong> becomes <strong>cSQLServer</strong>)
                    </li>
                    <li>
                        <strong>Resource folder (ex: MSFT_xSQLServerSetup</strong> becomes <strong>Contoso_cSQLServerSetup</strong>)
                    </li>
                    <li>
                        <strong>Resource Name (ex: MSFT_xSQLServerSetup</strong> becomes <strong>Contoso_cSQLServerSetup</strong>)
                    </li>
                    <li>
                        <strong>Resource Friendly Name (ex: xSQLServerSetup</strong> becomes <strong>cSQLServerSetup</strong>)
                    </li>
                    <li>
                        <strong>MOF class name (ex: MSFT_xSQLServerSetup</strong> becomes <strong>Contoso_cSQLServerSetup</strong>)
                    </li>
                    <li>
                        <strong>Filename for the &lt;resource&gt;.schema.mof (ex: MSFT_xSQLServerSetup</strong>.schema.mof becomes <strong>Contoso_cSQLServerSetup</strong>.schema.mof)
                    </li>
                </ul>
            </li>
            <li>
                Update module and metadata information in the module manifest
            </li>
            <li>
                Update any configuration that use these resources
            </li>
        </ol>
        <p><em>We reserve resource and module names without prefixes ("x" or "c") for future use (e.g. "MSFT_SQLServerSetup" or "SQLServerSetup"). If the next version of Windows Server ships with "MSFT_SQLServerSetup" resources, we don't want to break any configurations that use any community modifications. Please keep a prefix such as "c" on all community modifications.</em></p>


        <h1 style="color:#2e74b5; font-family:Calibri Light; font-size:large">Versions</h1>
    <p>1.2.0.0</p>
    <ul style="list-style-type:disc; direction:ltr">
        <li>
            Updated release with the following new resources
            <ul style="list-style-type:circle">
                <li>
                    xSQLServerFailoverClusterSetup
                </li>
                <li>
                    xSQLServerRSConfig
                </li>
            </ul>
        </li>
    </ul>

        <p>1.1.0.0</p>
        <ul style="list-style-type:disc; direction:ltr">
            <li>
                Initial release with the following resources
                <ul style="list-style-type:circle">
                    <li>
                        xSQLServerSetup
                    </li>
                    <li>
                        xSQLServerFirewall
                    </li>
                    <li>
                        xSQLServerRSSecureConnectionLevel
                    </li>
                </ul>
            </li>
        </ul>
        <h1 style="margin-bottom:0pt; font-family:Calibri Light; color:#2e74b5; font-size:large">Examples</h1>
        <p>Examples for use of this resource can be found with the System Center resources, such as xSCVMM, xSCSMA, and xSCOM</p>
        <p></p>
        <p></p>
        </span>
</div>
</body>
